import axios from 'https://cdn.jsdelivr.net/npm/axios@1.7.7/+esm';
console.log(axios)

const request = axios.create({
  baseURL: 'http://localhost:8080'
})

request.interceptors.response.use(
  (response) => {
    if(response.data && response.data.success) {
      // return response
    } else {
      // throw new Error(response.data.message, '服务器错误')
    }
  }, 
  (error) => {
    // console.log(error)
  }
)

export default request